<?php
use frontend\assets\AppAsset;
use yii\helpers\Url;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;

AppAsset::register($this);
$this->title = '注册';
$this->params['breadcrumbs'][] = $this->title;
$image_bath_url = Yii::$app->params['imageBathUrl'];
?>
<?php
AppAsset::addCss($this,$image_bath_url."/static/pc/css/login.css");
?>
<section class="form_box">
<div class="form-w">
    <!-- 路径 -->
    <div class="form_title">
        <div><span>首页</span> > <span>注册</span></div>
    </div>
    <!-- 路径End -->
    <div class="form_content">
        <div class="form-w-inner">
            <div class="form-left">
                <h1 class="h1">注册有礼<span class="icon icon-li"></span></h1>
                <?php
                $form = ActiveForm::begin(['id' => 'register-info-form','action'=>'/login/register','method'=>'post']);
                ?>
                <div class="form_input_group mt40" id="register_form">

                    <?= $form->field($model, 'mobile',['template'=>'<div class="form_phone_group input-box"><label class="input_add_icon">手机号:</label>{input}</div>'])
                        ->textInput(['class' => 'input_value js_phone','placeholder'=>'输入手机号']) ?>

                    <?= $form->field($model, 'pwd',['template'=>'<div class="form_password_group mt25 input-box"><label class="input_add_icon">输入密码:</label>{input}</div>'])
                        ->textInput(['type'=>'password','class' => 'input_value js_password','placeholder'=>'6-16密码，区分大小写']) ?>

                    <?= $form->field($model, 'rePwd',['template'=>'<div class="form_passwordsure_group mt25 input-box"><label class="input_add_icon">确认密码:</label>{input}</div>'])
                        ->textInput(['type'=>'password','class' => 'input_value js_password_sure','placeholder'=>'6-16密码，区分大小写']) ?>

                    <?= $form->field($captcha_model, 'verifyCode')->widget(Captcha::className(), ['captchaAction'=>'login/captcha',
                        'template' => '<div class="img_verification verification_input mt25 input-box"><input id="captchaform-verifyCode" name="CaptchaForm[verifyCode]" type="text" class="img_verification_value v-text js_img_code input_value" placeholder="输入图形验证码"/><span class="img_show v-btn">{image}</span></div>',
                    ]) ?>

                    <?= $form->field($model, 'mobileCode',['template'=>'<div class="phone_verification verification_input mt25 input-box">{input}<button type="button" class=" phoneV_btn v-btn">获取手机验证码</button></div>'])
                        ->textInput(['class' => 'phoneV_value v-text input_value js_phone_code','placeholder'=>'输入手机验证码']) ?>

                    <?= $form->field($model, 'isAllowed',['template'=>'<div class="form_forget_password mt20">{input}<span>同意<a href="javascript:;" class="a_about">《剪刀石头布注册条款》</a> </span></div>'])
                        ->textInput(['type'=>'checkbox','class' => 'checkbox_input r_checked']) ?>

                    <div class="user_login_btn">
                        <span class="tipinfo"></span>
                        <button type="button" id="register_btn" class="user_login btn js-register-btn">立即注册<i class="icon arrow_icon"></i></button>
                    </div>
                </div>
            <?php ActiveForm::end(); ?>
            </div>
            <span class="bg_line icon icon-bg-line "></span>
            <div class="form_right">
                <h3>已经是会员？</h3>
                <a href="<?php echo Url::to(['/login/index']);?>" class="go_register btn">立即登录<i class="icon arrow_icon"></i></a>
                <div class="webchat_login">
                    <span class="icon icon-wechat-login"></span>
                    <a href="javascript:;">微信快捷登录</a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="tips">
    <p class="tips_info"></p>
</div>
</section>
<?php
AppAsset::addJs($this,$image_bath_url."/static/common/jquery.cookie.js");
AppAsset::addJs($this,$image_bath_url."/static/pc/js/register.js?ver=001");
?>

